package cn.com.dao;

import cn.com.pojo.UserBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    @Select("select * from t_users")
    public List<UserBean> findAll();
    @Select("select * from t_users where telephone=#{telephone}")
    public UserBean getByTel(String telephone);
    @Insert("insert into t_users values(null,#{telephone},#{password})")
    public int add(UserBean userBean);
    @Update("update t_users set password=#{password} where telephone=#{telephone}")
    public int update(UserBean userBean);
}
